﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Contact.aspx.cs" Inherits="Web.Contact" %>

<!doctype html>
<html lang="en">
<head>
    <base target="_self" />
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="0">
    <link href="yaml/core/base.min.css" rel="stylesheet" />
    <link href="yaml/forms/gray-theme.css" rel="stylesheet" />
    <link href="yaml/screen/typography.css" rel="stylesheet" />
    <!--[if lte IE 7]>
      <link rel="stylesheet" href="yaml/core/iehacks.min.css" type="text/css"/>
      <![endif]-->
    <!--[if lt IE 9]>
      <script src="yaml/lib/html5shiv/html5shiv.js"></script>
      <![endif]-->
    <style>
		.noAuthed,.hide{display:none;}
    </style>
    <script src="Scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.treetable.js" type="text/javascript"></script>
    <script>
        $(document).ready(function () {
            $.treetable.defaults = {
                id_col: 0, //ID td列 {从0开始}
                parent_col: 1, //父ID td列
                handle_col: 2, //加上操作展开操作的 td列
                open_img: "Images/minus.gif",
                close_img: "Images/plus.gif"
            };
            //只能应用于tbody
            $("#tb").treetable();
        });
        function contactEdit(id) {
            var url = 'EmpContactEdit.aspx?empId=' + id;
            var retVal = window.showModalDialog(url, window, 'dialogWidth=550px;dialogHeight=350px;status=no;help=no;');
            if (retVal != undefined && retVal.indexOf('Succeed') >= 0) {
                location.reload();
            }
        }
    </script>
</head>
<body><form id="Form1" runat=server>
<asp:Repeater ID="rptList" EnableViewState="False" Runat="server">
	<HeaderTemplate>
		<table id="tbList" class="s1 bordertable">
			<thead>
				<TR>
                    <th class="hide">id</th>
                    <th class="hide">pid</th>
					<th width="20%">部门</th>
					<th width="20%">姓名</th>
					<th width="15%">分机</th>
					<th width="20%">手机</th>
					<th width="15%">短号</th>
					<th class="<%=noAuthed%>">操作</th>
				</TR>
			</thead>
			<tbody id="tb">
	</HeaderTemplate>
	<ItemTemplate>
		<tr>
			<td class="hide"><%#Eval("DeptId")%></td>
			<td class="hide"><%#Eval("DeptPid")%></td>
			<td><%#Eval("Dep")%></td>
			<td><%#Eval("Name")%></td>
			<td><%#Eval("TelExt")%></td>
			<td><%#getMobile(Eval("Mobile"), Eval("DeptId"))%></td>
			<td><%#Eval("ShortNo")%></td>
			<td class="<%=noAuthed%>"><a href="#" onclick="javascript:return contactEdit(<%# Eval("Id")%>);">[编辑]</a></td>
		</tr>
	</ItemTemplate>
	<FooterTemplate>
		</tbody> </table>
	</FooterTemplate>
</asp:Repeater></form>
</body>
</html>